package com.zlzlib.common.bean;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * 是否类型
 *
 * @DateTime: 2023/4/18 9:39
 * @Author zlz
 * @Version 1.0
 */
@Getter
@RequiredArgsConstructor
public enum BooleanEnum implements BaseEnum {
    /**
     * 是
     */
    yes("是"),
    /**
     * 不是
     */
    no("否");


    private final String desc;

    public String getValue() {
        return name();
    }

    public boolean isValue() {
        return this == yes;
    }

    public static BooleanEnum getInstance(boolean is) {
        return is ? yes : no;
    }
}
